package entities;

/**
 * @author Omri Barda		039725890 
 * @author Amit Joseph		034608547
 * @author Gilad Shpigel  	300162393
 * @author Elad Elbaz		040539959
 * @version June 2012
 */

import java.io.Serializable;

public class QuestionPerExam implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	final public static int ERROR = 99999;
	private int questionGrade;
	private Question question;

	/**
	 * constructor
	 * 
	 * @param questionGrade
	 * @param question
	 */
	public QuestionPerExam(int questionGrade, Question question) {
		super();
		this.questionGrade = questionGrade;
		this.question = question;

	}

	/**
	 * empty constructor
	 */
	public QuestionPerExam() {

	}

	// ------------------
	// Setters & Getters
	// ------------------

	/**
	 * @return the questionGrade
	 */
	public int getQuestionGrade() {
		return questionGrade;
	}

	/**
	 * @param questionGrade
	 *            the questionGrade to set
	 */
	public void setQuestionGrade(int questionGrade) {
		this.questionGrade = questionGrade;
	}

	/**
	 * @return the question
	 */
	public Question getQuestion() {
		return question;
	}

	/**
	 * @param question
	 *            the question to set
	 */
	public void setQuestion(Question question) {
		this.question = question;
	}

	/**
	 * 
	 * @param Qnum
	 *            is the question ID
	 */
	public void SetQuestionNum(int Qnum) {
		if (question == null)
			question = new Question();
		this.question.setqID(Qnum);
	}

}
